package com.wl.mybootwork3.configure;

import com.wl.mybootwork3.entity.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author wl
 * @version 1.0
 * @date 2022/6/13
 * @description:
 */
//将当前的类标志为配置类交由IOC容器管理
//@Configuration
public class MyConfigure {


    //该注解的返回值会加入到IOC容器中 id名为方法名
    @Bean
    public User user1(){
        User user =new User();
        user.setAge(11);
        user.setUsername("wl");
        return user;
    }



}
